<div class="page-header">
    <div class="pull-left">
        <h1 class="content-title">客户管理</h1>
        <ul class="fl">
            <li>
                <button class="btn btn-block btn-info newOrg"><i class="fui-plus-circle icon-menu"></i></i>
                    <span>新建客户</span>
                </button>
            </li>
            <li>
                <button class="btn btn-block btn-primary newDir"><i class="fui-plus-circle icon-menu"></i></i>
                    <span><%= __('store.businessTime') %></span>
                </button>
            </li>
            <li>
                <button class="btn btn-block btn-success newShop"><i class="fui-plus-circle icon-menu"></i></i>
                    <span><%= __('store.addStores') %></span>
                </button>
            </li>
        </ul>
    </div>
</div>
<div class="dolphin-col-24 main" id="myContent">
    <div class="row">
        <div class="col-md-3">
            <div class="panel panel-primary box">
                <div class="panel-heading box-title">
                    <h3 class="panel-title">
                        <i class="fa fa-table fa-lg" aria-hidden="true"></i>
                        客户树
                    </h3>
                </div>
                <div id="orgTree"></div>
            </div>
        </div>
        <div class="col-md-9">
            <div class="panel panel-info" style="margin-bottom: 8px;" id="basicInfo">
                <div class="panel-heading" style="padding: 5px 10px;">
                    <div class="panel-title">
                        <%= __('framework.basic.information') %>
                    </div>
                </div>
                <div class="panel-body form-horizontal" id="baseInfo" style="padding: 5px;">
                    <div class="dolphin-row">
                        <div class="dolphin-col-8">
                            <label class="col-sm-4 control-label" style="text-align: left;">
                                <%= __('framework.clientName') %>
                            </label>
                            <div class="col-sm-8">
                                <p class="form-control-static" name="name" style="color: #868686;font-size:14px;"></p>
                            </div>
                        </div>
                        <div class="dolphin-col-16">
                            <label class="col-sm-2 control-label"  style="text-align: left;">
                                <%= __('framework.address') %>
                            </label>
                            <div class="col-sm-10">
                                <p class="form-control-static" name="address" style="color: #868686;font-size:14px;"></p>
                            </div>
                        </div>
                        <div class="dolphin-col-8">
                            <label class="col-sm-4 control-label"  style="text-align: left;">
                                <%= __('framework.clientCode') %>
                            </label>
                            <div class="col-sm-8">
                                <p class="form-control-static" name="code" style="color: #868686;font-size:14px;"></p>
                            </div>
                        </div>
                        <div class="dolphin-col-8">
                                <label class="col-sm-4 control-label"  style="text-align: left;">
                                    <%= __('framework.contactPerson') %>
                                </label>
                                <div class="col-sm-8">
                                    <p class="form-control-static" name="contactPerson" style="color: #868686;font-size:14px;"></p>
                                </div>
                        </div>
                        <div class="dolphin-col-8">
                                <label class="col-sm-4 control-label"  style="text-align: left;">
                                    <%= __('framework.telephone') %>
                                </label>
                                <div class="col-sm-8">
                                    <p class="form-control-static" name="mobile" style="color: #868686;font-size:14px;"></p>
                                </div>
                        </div>
                        <div class="dolphin-col-8">
                            <label class="col-sm-4 control-label"  style="text-align: left;">
                                Email
                            </label>
                            <div class="col-sm-8">
                                <p class="form-control-static" name="email" style="color: #868686;font-size:14px;"></p>
                            </div>
                        </div>
                        <div class="dolphin-col-8 perInfo cus">
                            <label class="col-sm-4 control-label"  style="text-align: left;">
                                <%= __('framework.clientSource') %>
                            </label>
                            <div class="col-sm-8">
                                <p class="form-control-static" name="sourceCaption" style="color: #868686;font-size:14px;"></p>
                            </div>
                        </div>
                        <div class="dolphin-col-8 perInfo cus">
                            <label class="col-sm-4 control-label"  style="text-align: left;">
                                <%= __('framework.businessCategory') %>
                            </label>
                            <div class="col-sm-8">
                                <p class="form-control-static" name="industryCaption" style="color: #868686;font-size:14px;"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="panel panel-primary" id="enum_option">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        <i class="fa fa-list fa-lg" aria-hidden="true"></i>
                        门店列表
                    </h3>
                </div>
                <div id="deviceList"></div>
            </div>
        </div>
    </div>
</div>


<div class="modal" id="data_win">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <span class="modal-title">客户维护</span>
            </div>
            <div class="modal-body">
                <div class="tab-pane">
                    <form class="form-horizontal edit-form">
                        <input type="hidden" class="form-control" name="id">
                        <input type="hidden" name="category" value="1">
                        <input type="hidden" name="level" value="2">
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.clientName') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="name" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.clientCode') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="code" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.clientSource') %></label>
                            <div class="col-md-6">
                                <select class="form-control" options="source" name="source"></select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.businessCategory') %></label>
                            <div class="col-md-6">
                                <select class="form-control" options="industry" name="industry"></select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.contactPerson') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="contactPerson" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.cellphoneNumber') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="mobile" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.email') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="email" type="email">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.address') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="address" type="text">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn_submit" data-cla="edit-form" data-win="data_win"><%= __('account.save') %>
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal"><%= __('account.delete') %></button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>

<div class="modal fade" id="dirDataModal" tabindex="-1" role="dialog" aria-labelledby="dirDataModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="dirDataModalLabel">新增目录</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal dir-form">
                    <input type="hidden" name="parent.id"/>
                    <input type="hidden" class="form-control" name="id">
                    <input type="hidden" name="category" value="2">
                    <input type="hidden" name="level" value="3">
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">目录名称</label>
                        <div class="col-md-6">
                            <input class="form-control" name="name" type="text" dol-validate="required">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn_submit" data-cla="dir-form" data-win="dirDataModal">
                    确定
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal"><%= __('account.save') %></button>
            </div>
        </div>
    </div>
</div>

<div class="modal" id="shop_win">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <span class="modal-title">门店维护</span>
            </div>
            <div class="modal-body">
                <div class="tab-pane">
                    <form class="form-horizontal shop-form">
                        <input type="hidden" class="form-control" name="id">
                        <input type="hidden" name="parent.id"/>
                        <input type="hidden" name="category" value="3">
                        <input type="hidden" name="level" value="4">
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('store.name') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="name" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('store.storeCode') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="code" type="text" dol-validate="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('store.storeType') %></label>
                            <div class="col-md-6">
                                <select style="width: 160px;" id="shopType" name="shopType"   options="" ></select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.province') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="province" placeholder="<%= __('framework.province') %>" type="text" style="width: 45%;float: left;">
                                <input class="form-control" name="city" placeholder="<%= __('framework.city') %>" type="text" style="width: 45%;float: right;">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.storeAddress') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="address" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.timezone') %></label>
                            <div class="col-md-6">
                                <select class="form-control" id="timeZone" name="timeZone" >
                                    <option value="0">UTC</option>
                                    <option value="1">UTC+1</option>
                                    <option value="2">UTC+2</option>
                                    <option value="3">UTC+3</option>
                                    <option value="4">UTC+4</option>
                                    <option value="5">UTC+5</option>
                                    <option value="6">UTC+6</option>
                                    <option value="7">UTC+7</option>
                                    <option value="8">UTC+8</option>
                                    <option value="9">UTC+9</option>
                                    <option value="10">UTC+10</option>
                                    <option value="11">UTC+11</option>
                                    <option value="-11">UTC-11</option>
                                    <option value="-10">UTC-10</option>
                                    <option value="-9">UTC-9</option>
                                    <option value="-8">UTC-8</option>
                                    <option value="-7">UTC-7</option>
                                    <option value="-6">UTC-6</option>
                                    <option value="-5">UTC-5</option>
                                    <option value="-4">UTC-4</option>
                                    <option value="-3">UTC-3</option>
                                    <option value="-2">UTC-2</option>
                                    <option value="-1">UTC-1</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('store.businessTime') %></label>
                            <div class="col-md-6">
                                <div class="input-group date dolphin_datetime_picker" style="width: 45%;float: left;">
                                    <select class="form-control" name="openTime" dol-validate="required">
                                        <option value="">--<%= __('account.pleaseSelect') %>--</option>
                                        <option value="0:00">0:00</option>
                                        <option value="0:30">0:30</option>
                                        <option value="1:00">1:00</option>
                                        <option value="1:30">1:30</option>
                                        <option value="2:00">2:00</option>
                                        <option value="2:30">2:30</option>
                                        <option value="3:00">3:00</option>
                                        <option value="3:30">3:30</option>
                                        <option value="4:00">4:00</option>
                                        <option value="4:30">4:30</option>
                                        <option value="5:00">5:00</option>
                                        <option value="5:30">5:30</option>
                                        <option value="6:00">6:00</option>
                                        <option value="6:30">6:30</option>
                                        <option value="7:00">7:00</option>
                                        <option value="7:30">7:30</option>
                                        <option value="8:00">8:00</option>
                                        <option value="8:30">8:30</option>
                                        <option value="9:00">9:00</option>
                                        <option value="9:30">9:30</option>
                                        <option value="10:00">10:00</option>
                                        <option value="10:30">10:30</option>
                                        <option value="11:00">11:00</option>
                                        <option value="11:30">11:30</option>
                                        <option value="12:00">12:00</option>
                                        <option value="12:30">12:30</option>
                                        <option value="13:00">13:00</option>
                                        <option value="13:30">13:30</option>
                                        <option value="14:00">14:00</option>
                                        <option value="14:30">14:30</option>
                                        <option value="15:00">15:00</option>
                                        <option value="15:30">15:30</option>
                                        <option value="16:00">16:00</option>
                                        <option value="16:30">16:30</option>
                                        <option value="17:00">17:00</option>
                                        <option value="17:30">17:30</option>
                                        <option value="18:00">18:00</option>
                                        <option value="18:30">18:30</option>
                                        <option value="19:00">19:00</option>
                                        <option value="19:30">19:30</option>
                                        <option value="20:00">20:00</option>
                                        <option value="20:30">20:30</option>
                                    </select>
                                </div>
                                <div class="input-group date dolphin_datetime_picker" style="width: 45%;float: right;">
                                    <select class="form-control" name="closeTime" dol-validate="required">
                                        <option value="10:00">10:00</option>
                                        <option value="10:30">10:30</option>
                                        <option value="11:00">11:00</option>
                                        <option value="11:30">11:30</option>
                                        <option value="12:00">12:00</option>
                                        <option value="12:30">12:30</option>
                                        <option value="13:00">13:00</option>
                                        <option value="13:30">13:30</option>
                                        <option value="14:00">14:00</option>
                                        <option value="14:30">14:30</option>
                                        <option value="15:00">15:00</option>
                                        <option value="15:30">15:30</option>
                                        <option value="16:00">16:00</option>
                                        <option value="16:30">16:30</option>
                                        <option value="17:00">17:00</option>
                                        <option value="17:30">17:30</option>
                                        <option value="18:00">18:00</option>
                                        <option value="18:30">18:30</option>
                                        <option value="19:00">19:00</option>
                                        <option value="19:30">19:30</option>
                                        <option value="20:00">20:00</option>
                                        <option value="20:30">20:30</option>
                                        <option value="21:00">21:00</option>
                                        <option value="21:30">21:30</option>
                                        <option value="22:00">22:00</option>
                                        <option value="22:30">22:30</option>
                                        <option value="23:00">23:00</option>
                                        <option value="23:30">23:30</option>
                                        <option value="23:59">23:59</option>
                                    </select>
                                </div>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.contactPerson') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="contactPerson" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.telephone') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="telephone" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-offset-1 col-md-2 control-label"><%= __('account.cellphoneNumber') %></label>
                            <div class="col-md-6">
                                <input class="form-control" name="mobile" type="text">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn_submit" data-cla="shop-form" data-win="shop_win"><%= __('account.save') %>
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal"><%= __('account.delete') %></button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>

<div class="modal fade" id="device_model" tabindex="-1" role="dialog" aria-labelledby="device_modelLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="device_modelLabel"><%= __('equipment.addEquipment') %></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal device-form">
                    <input type="hidden" class="form-control" name="id">
                    <input type="hidden" class="form-control" name="customer.id">
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.equipmentName') %></label>
                        <div class="col-md-6">
                            <input class="form-control" name="name" type="text" dol-validate="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.equipmentCode') %></label>
                        <div class="col-md-6">
                            <input class="form-control" name="code" type="text" dol-validate="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.equipmentType') %></label>
                        <div class="col-md-6">
                            <select class="form-control" options="deviceType" name="type"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label"><%= __('framework.equipmentPosition') %></label>
                        <div class="col-md-6">
                            <select class="form-control" options="devicePosition" name="position"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">设备IP</label>
                        <div class="col-md-6">
                            <input class="form-control" name="ipAddress" type="text">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary device_submit" data-cla="device-form"
                        data-win="device_model">
                    确定
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal"><%= __('account.delete') %></button>
            </div>
        </div>
    </div>
</div>

<div class="modal" id="org_relation_win">
    <div class="modal-dialog" style="width: 70%;left: 20%;top: 5%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <span class="modal-title">组织人员维护</span>
            </div>
            <div class="modal-body">
                <div class="dolphin-row">
                    <div class="dolphin-col-9">
                        <div id="selectedList"></div>
                    </div>
                    <div class="dolphin-col-3" style="margin-top: 50px;">
                        <button class="btn btn-info btn-block selectbtn" change="select" all="true">&lt;&lt;</button>
                        <button class="btn btn-info btn-block selectbtn" change="select">&lt;</button>
                        <br/><br/>
                        <button class="btn btn-success btn-block selectbtn" change="unSelect">&gt;</button>
                        <button class="btn btn-success btn-block selectbtn" change="unSelect" all="true">
                            &gt;&gt;</button>
                    </div>
                    <div class="dolphin-col-12">
                        <div id="unselectedList"></div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary relation_submit"><%= __('account.save') %></button>
                <button type="button" class="btn btn-default" data-dismiss="modal"><%= __('account.delete') %></button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
</div>
<script src="<%= global.config.cdn %>/bootstrap-datepicker/1.6.1/js/bootstrap-datepicker.min.js"></script>
<script src="<%= global.config.publicPath %>/page/scripts/<%= path %>.js"></script>